<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>局部组件</title>
</head>
<body>
<div id="app">
    <runoob></runoob>
</div>
</body>
<script src="../static/js/vue.js"></script>
<script>
    var Child = {
        template: '<h1>自定义组件!</h1>'
    }

    var vm = new Vue({
        el:'#app',
        components:{
            // <runoob> 将只在父模板可用
            'runoob':Child
        }
    })
</script>
</html>